package exception;
import java.io.FileOutputStream;
import java.io.IOException;
/**AuToClose*/
public class AuToCloseDemo {
    public static void main(String[] args) {
        try (
                FileOutputStream fos= new FileOutputStream("test.txt");
                ){
            fos.write(1);
            } catch (IOException e) {
            System.out.println("出错了");
        }
    }
}
